If you want to calculate time differences, for example, the time between 23:30 and 01:10 in the same night, use the following formula:
例えば一晩のうちの 23:30 と 01:10 の間が何時間何分であるかを計算するには、次の数式を使います:
=(B2<A2)+B2-A2
=(B2<A2)+B2-A2
The later time is B2 and the earlier time is A2. The result of the example is 01:40 or 1 hour and 40 minutes.
セル A2 には早いほうの時刻 (23:30) B2 には遅いほうの時刻 (01:10) を入力します。結果は 01:40 つまり1時間40分となります。
In the formula, an entire 24-hour day has a value of 1 and one hour has a value of 1/24. The logical value in parentheses is 0 or 1, corresponding to 0 or 24 hours. The result returned by the formula is automatically issued in time format due to the sequence of the operands.
この数式は、1日24時間が値 1 に相当し、1時間はその値の 1/24 であるとみなします。かっこ内の論理値は 0 または 1 で、論理値が 0 の場合は 0 時間、論理値が 1 の場合は 24 時間となります。数式の結果には項の順番により、自動的に時刻書式が適用されます。